﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace VehicleRecordSystem.util
{
    class VRSValidate
    {
        public static bool isNumberic(string text)
        {
            Regex regex = new Regex("^[0-9.]+$");
            return regex.IsMatch(text);
        }
        public static bool isInteger(String text)
        {
            Regex regex = new Regex("^[0-9]+$");
            return regex.IsMatch(text);
        }
        public static Boolean validUri(String path)
        {
            Boolean ok = true;
            try
            {
                new Uri(path);
            }
            catch
            {
                ok = false;
            }
            return ok;
        }
    }
}
